<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>模版数据管理 HDSysCms</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/style/admin.css" media="all">
</head>
<body data="HDSYSCMS 2021本系统受国家版权局保护请勿破解或者二次开发传播">
<div class="layui-col-md12">
<div style="padding-left: 10px;line-height: 35px;" class="layui-card">
<span class="layui-breadcrumb">
<a href="">模版管理</a>
<a href=""><?php echo set_get('id') ?></a>
</span>
</div>
</div>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-tab layui-tab-brief">
<ul class="layui-tab-title">
<li class="layui-this" onclick="window.location.href='index.php?m=manage&c=Ad&a=document&id=<?php echo  set_get('id')  ?>'">页面视图文件</li>
<li onclick="window.location.href='index.php?m=manage&c=Ad&a=table&id=<?php echo  set_get('id')  ?>'">动态标签</li>
<li onclick="window.location.href='index.php?m=manage&c=Ad&a=mode&id=<?php echo  set_get('id')  ?>'">模块文件</li>
<li onclick="window.location.href='index.php?m=manage&c=Ad&a=info&id=<?php echo  set_get('id')  ?>'">模版信息</li>
<li onclick="window.location.href='index.php?m=manage&c=Template&a=back_template&id=<?php echo  set_get('id')  ?>'">备份模版</li>
</ul>
</div>
<div class="layui-card-body">
<table lay-skin="line" lay-size="lg" class="layui-table" lay-even id="test-table-toolbar" lay-filter="test-table-toolbar"></table>
<script type="text/html" id="test-table-toolbar-barDemo"><?php  ;$param_arr=call_my_is_visualization($param_id);if ($param_arr['code']==2) {  ?><a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon">&#xe642;</i>可视化编辑</a><?php } ?><a class="layui-btn layui-btn-xs" lay-event="open"><i class="layui-icon">&#xe642;</i>浏览页面</a><a class="layui-btn layui-btn-xs" lay-event="del"><i class="layui-icon">&#xe640;</i>删除</a></script>
</div>
</div>
</div>
</div>
</div>
<?php adminechohtnl(); ?>
<div id="foot">Copyright © 2019-2023 <a href="https://www.HDSysCms.Com?pro" target="_blank">HDSysCms <?php echo HDSYS_VERSION; ?></a> <br>
All Rights Reserved </div>
<script src="<?php echo getcdnurlhost() ?>/admin/layui/layui.js"></script>
<script>layui.config({base: '<?php echo getcdnurlhost() ?>/admin/'}).extend({index: 'lib/index'}).use(['jquery', 'index', 'table', 'layer'], function() {var admin=layui.admin,$=layui.$,table=layui.table;table.render({elem: '#test-table-toolbar',url: 'index.php?m=<?php echo set_get('m'); ?>&c=<?php echo set_get('c'); ?>&a=<?php echo set_get('a'); ?>_ajax&json=get&soso_ok=1&id=<?php echo set_get('id'); ?>',toolbar: false  ,skin: 'line',title: '下载列表',groups: 1  ,first: false  ,last: false  ,cols: [[{field: 'name',width: 300,title: '模版文件名称'}, {field: 'code',maxwidth: 200,title: '模版名'}, {fixed: 'right',title: '操作',toolbar: '#test-table-toolbar-barDemo',width: 280}]],page: false});table.on('edit(test-table-toolbar)', function(obj) {var value=obj.value  ,data=obj.data  ,field=obj.field;$.ajax({type: "post",url: 'index.php?m=manage&c=<?php echo set_get('c') ?>&a=edit_table_ajax',data: 'id=' + data.id + "&field=" + value,dataType: "json",success: function(ret) {layer.msg(ret.msg);table.reload('test-table-toolbar', {page: {curr: 1}});},error: function(e, t) {layer.alert('接口请求返还异常');}})});table.on('tool(test-table-toolbar)', function(obj) {var data=obj.data;if (obj.event==='del') {layer.confirm("你确定删除【" + data.name + "】吗? ", {btn: ['确定', '取消']}, function() {$.ajax({type: "post",url: 'index.php?m=manage&c=Template&a=template_del_ajax',data: 'file=' + encodeURIComponent(data.name) + '&dir=<?php echo set_get('id'); ?>',dataType: "json",success: function(ret) {layer.msg(ret.msg);if (ret.code==1000) {obj.del();}},error: function(e, t) {layer.alert('接口请求返还异常');}})});} else if (obj.event==='edit') {$.ajax({type: "post",url: 'index.php?m=manage&c=Template&a=template_open_ajax',data: 'file=index.hdsys.php&open=' + data.name + '&dir=chm',dataType: "json",success: function(ret) {window.open('index.php?m=manage&c=Div&a=Template&id=chm&url=' + encodeURIComponent(ret.url));layer.msg(ret.msg + ',需要浏览器准许弹窗.');},error: function(e, t) {layer.alert('接口请求返还异常');}})} else if (obj.event==='open') {$.ajax({type: "post",url: 'index.php?m=manage&c=Template&a=template_open_ajax',data: 'file=index.hdsys.php&open=' + data.name + '&dir=chm',dataType: "json",success: function(ret) {window.open(ret.url);layer.msg(ret.msg + ',需要浏览器准许弹窗.');},error: function(e, t) {layer.alert('接口请求返还异常');}})}});$('.layuiadmin-btn-useradmin').on('click', function() {table.reload('test-table-toolbar', {page: {curr: 1},where: {soso: $("#soso").val()}});});$('.bin-add').on('click', function() {location.href="index.php?m=manage&c=<?php echo set_get('c') ?>&a=add";});});</script>
<style>.templetimg {width: 90px;height: 60px;}</style>
</body>
</html>